function playInfoSubmit() {
    let playName = $('#playName').val();
    if (playName === null || playName === undefined || playName.trim() === ''){
        toastr.clear();
        toastr.error('请输入陪玩昵称！');
        return;

    }
    let playLevel = $('#playLevel').val();
    let playKook = $('#playKook').val();
    let playSource = $('#playSource').val();
    let playChat = $('#playChat').val();
    let playAlipay = $('#playAlipay').val();
    let playNotes = $('#playNotes').val();
    let blackList = $('#blackList').val();
    let playGender = $('#playGender option:selected').val();

    let playInfo = {
        playName: playName,
        playLevel: playLevel,
        playKookName: playKook,
        playSource: playSource,
        playChatName: playChat,
        playAlipayName: playAlipay,
        playNotes: playNotes,
        playBlackList: blackList,
        playGender: playGender
    }
    $.ajax({
        type: "post",
        url:"/playWithEnter/insertPlayInfo",
        cache: false,
        data: playInfo,
        dataType:'json',
        success: function (res) {
            if (res.code == 200) {
                $('#playName').val(null);
                $('#playLevel').val(null);
                $('#playKook').val(null);
                $('#playSource').val(null);
                $('#playChat').val(null);
                $('#playAlipay').val(null);
                $('#playNotes').val(null);
                $('#blackList').val(null);
                // $("#playGender").selectedIndex = 0;
                $("#playGender").val('0');
                setMsg();
            } else {
                toastr.clear();
                toastr.error('该陪玩已存在，请重新输入陪玩昵称！');
            }
        },
        complete: function () {

        },
        error: function(res) {
            toastr.clear();
            toastr.error('录入失败，检查录入数据是否正确！');
        }
    });

}

function setMsg() {
    let errMsg = '陪玩录入成功';
    if (errMsg != null && errMsg != '') {
        toastr.clear();
        toastr.success(errMsg);
    }
}